<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:66:"C:\wamp\www\tp5\public/../application/admin\view\category\add.html";i:1536665068;s:65:"C:\wamp\www\tp5\public/../application/admin\view\index\index.html";i:1536635754;}*/ ?>
<!DOCTYPE html>
<html lang="cn">
<head>
    <meta charset="utf-8"/>
    <title>控制台 - Bootstrap后台管理系统模版Ace下载</title>
    <meta name="keywords" content="Bootstrap模版,Bootstrap模版下载,Bootstrap教程,Bootstrap中文"/>
    <meta name="description" content="站长素材提供Bootstrap模版,Bootstrap教程,Bootstrap中文翻译等相关Bootstrap插件下载"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <!-- basic styles -->
    <link href="/static/admin/css/bootstrap.min.css" rel="stylesheet"/>
    <link rel="stylesheet" href="/static/admin/css/font-awesome.min.css"/>
    <link rel="stylesheet" href="/static/admin/css/toastr.css"/>
    <!--[if IE 7]>
    <link rel="stylesheet" href="/static/admin/css/font-awesome-ie7.min.css"/>
    <![endif]-->
    
    
    <!-- page specific plugin styles -->

    <!-- fonts -->

    <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:400,300"/>
    <!-- 天气 -->
    <!--<link rel="stylesheet" type="text/css" href="/static/admin/css/normalize.css" />-->
    <!--<link rel="stylesheet" type="text/css" href="/static/admin/css/default.css">-->
    <!--<link rel="stylesheet" type="text/css" href="/static/admin/css/styles.css">-->

    <!-- ace styles -->
    <link rel="stylesheet" href="/static/admin/css/ace.min.css"/>
    <link rel="stylesheet" href="/static/admin/css/ace-rtl.min.css"/>
    <link rel="stylesheet" href="/static/admin/css/ace-skins.min.css"/>

    <!--[if lte IE 8]>
    <link rel="stylesheet" href="/static/admin/css/ace-ie.min.css"/>
    <![endif]--

    <!-- inline styles related to this page -->

    <!-- ace settings handler -->

    <script src="/static/admin/js/ace-extra.min.js"></script>

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->

    <!--[if lt IE 9]>
    <script src="/static/admin/js/html5shiv.js"></script>
    <script src="/static/admin/js/respond.min.js"></script>
    <![endif]-->

    <!-- 天气 -->
    <script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
    <!-- //For-Mobile-Apps -->
    <!-- Style -->
    <link rel="stylesheet" href="/static/admin/css/style1.css" type="text/css" media="all" />
    <!-- Style -->
    <!-- JavaScript -->
    <script type="text/javascript" src="/static/admin/js/jquery.min.js"></script>
    <!-- end 天气 -->
</head>
<script>
//function startTime() {
//    var today = new Date();
//    var h = today.getHours();
//    var m = today.getMinutes();
//    var s = today.getSeconds();
//    m = checkTime(m);
//    s = checkTime(s);
//    document.getElementById('txt').innerHTML =
//    h + ":" + m + ":" + s;
//    var t = setTimeout(startTime, 500);
//}
//function checkTime(i) {
//    if (i < 10) {i = "0" + i};  // add zero in front of numbers < 10
//    return i;
//}
</script>
<body >

<div class="navbar navbar-default" id="navbar">
    <script type="text/javascript">
        try {
            ace.settings.check('navbar', 'fixed')
        } catch (e) {
        }
    </script>

    <div class="navbar-container" id="navbar-container">
        <div class="navbar-header pull-left">
            <a href="#" class="navbar-brand">
                <small>
                    <i class="icon-leaf"></i>
                    ACE后台管理系统
                </small>
            </a><!-- /.brand -->
        </div><!-- /.navbar-header -->

        <div class="navbar-header pull-right" role="navigation">
            <ul class="nav ace-nav">


                <li class="green">
                    <a data-toggle="dropdown" class="dropdown-toggle" href="#">
                        <i class="icon-envelope icon-animated-vertical"></i>
                        <span class="badge badge-success">
                            <?php if (isset($picnum)): ?>
                                <?php echo $picnum; else: endif ?>
                        </span>
                    </a>

                    <ul class="pull-right dropdown-navbar dropdown-menu dropdown-caret dropdown-close">
<!--                         <li class="dropdown-header">
                            <i class="icon-envelope-alt"></i>
                              张未审核的图片
                        </li> -->

                        <li>
                            <a href="#">
                                <img src="/static/admin/avatars/user.jpg" class="msg-photo" alt="Alex's Avatar"/>
                                <span class="msg-body">
                                            <span class="msg-title">
                                                <span class="blue" style='font-size: 18px;'> 
                                                    <?php if (isset($picnum)): ?>
                                                    还有未审核的图片
                                                    <?php else: ?>
                                                        暂无消息
                                                    <?php endif ?>
    
                                                </span>
                                                
                                            </span>

                                        <!--     <span class="msg-time">
                                                <i class="icon-time"></i>
                                                <span>1分钟以前</span>
                                            </span> -->
                                        </span>
                            </a>
                        </li>


                        <li>
                            <a href="/uncheck">
                                <?php if (isset($picnum)): ?>
                                        去处理
                                    <?php else: ?>
                                        去添加一点吧
                                    <?php endif ?>
                                <i class="icon-arrow-right"></i>
                            </a>
                        </li>
                    </ul>
                </li>

                <li class="light-blue">
                    <a data-toggle="dropdown" href="#" class="dropdown-toggle">
                        <img class="nav-user-photo" src="/static/admin/avatars/user.jpg" alt="Jason's Photo"/>
                        <span class="user-info">
                                    <small>欢迎光临,</small>
                                    <?php echo session('admin')['name'] ?>
                                </span>

                        <i class="icon-caret-down"></i>
                    </a>

                    <ul class="user-menu pull-right dropdown-menu dropdown-yellow dropdown-caret dropdown-close">
 

                        <li>
                            <a href="/logout">
                                <i class="icon-off"></i>
                                退出
                            </a>
                        </li>
                    </ul>
                </li>
            </ul><!-- /.ace-nav -->
        </div><!-- /.navbar-header -->
    </div><!-- /.container -->
</div>

<div class="main-container" id="main-container">
    <script type="text/javascript">
        try {
            ace.settings.check('main-container', 'fixed')
        } catch (e) {
        }
    </script>

    <div class="main-container-inner">
        <a class="menu-toggler" id="menu-toggler" href="#">
            <span class="menu-text"></span>
        </a>

        <div class="sidebar" id="sidebar">
            <script type="text/javascript">
                try {
                    ace.settings.check('sidebar', 'fixed')
                } catch (e) {
                }
            </script>




            <!--控制台-->
            <ul class="nav nav-list">
                <li class="active">
                    <a href="<?php echo url('admin/index/index'); ?>">
                        <i class="icon-dashboard"></i>
                        <span class="menu-text"> 控制台 </span>

                    </a>
                </li>



                <!-- 后台RBAC -->
                <li>
                    <a href="#" class="dropdown-toggle">
                        <i class="icon-group"></i>
                        <span class="menu-text"> 后台权限管理 </span>

                        <b class="arrow icon-angle-down"></b>
                    </a>

                    <ul class="submenu">
                        <li>
                            <a href="<?php echo url('admin/user/index'); ?>">
                                <i class="icon-double-angle-right"></i>
                                用户信息管理
                            </a>
                        </li>

                        <li>
                            <a href="<?php echo url('admin/role/index'); ?>">
                                <i class="icon-double-angle-right"></i>
                                用户权限管理
                            </a>
                        </li>

                        <li>
                            <a href="<?php echo url('admin/privilege/index'); ?>">
                                <i class="icon-double-angle-right"></i>
                                角色权限分配
                            </a>
                        </li>
                    </ul>
                </li>

                <!-- 图片管理 -->
                <li>
                    <a href="#" class="dropdown-toggle">
                        <i class="icon-camera"></i>
                        <span class="menu-text"> 图片管理 </span>

                        <b class="arrow icon-angle-down"></b>
                    </a>

                    <ul class="submenu">
                        <li>
                            <a href="<?php echo url('admin/goods/index'); ?>">
                                <i class="icon-double-angle-right"></i>
                                已审核图片
                            </a>
                        </li>

                        <li>
                            <a href="<?php echo url('admin/goods/uncheck'); ?>">
                                <i class="icon-double-angle-right"></i>
                                未审核图片
                            </a>
                        </li>

                        <li>
                            <a href="<?php echo url('admin/goods/banner'); ?>">
                                <i class="icon-double-angle-right"></i>
                                轮播图管理
                            </a>
                        </li>

                    </ul>
                </li>



                <!-- 图片分类 -->
                <li>
                    <a href="#" class="dropdown-toggle">
                        <i class=" icon-picture"></i>
                        <span class="menu-text"> 图片分类管理 </span>

                        <b class="arrow icon-angle-down"></b>
                    </a>
                    <ul class="submenu">
                        <li>
                            <a href="<?php echo url('admin/category/index'); ?>">
                                <i class="icon-double-angle-right"></i>
                                图片分类管理
                            </a>
                        </li>

                        <li>
                            <a href="/addcate">
                                <i class="icon-double-angle-right"></i>
                                添加一级分类
                            </a>
                        </li>
                    </ul>
                </li>

                <!-- 用户 -->
                <li>
                    <a href="#" class="dropdown-toggle">
                        <i class=" icon-user"></i>
                        <span class="menu-text"> 用户管理 </span>
                        <b class="arrow icon-angle-down"></b>
                    </a>
                    <ul class="submenu">
                        <li>
                            <a href="<?php echo url('admin/member/index'); ?>">
                                <i class="icon-double-angle-right"></i>
                                用户列表
                            </a>
                        </li>
                    </ul>
                </li>
                
                <!-- 友链 -->
                <li>
                    <a href="#" class="dropdown-toggle">
                        <i class=" icon-globe"></i>
                        <span class="menu-text"> 友情链接 </span>
                        <b class="arrow icon-angle-down"></b>
                    </a>
                    <ul class="submenu">
                        <li>
                            <a href="<?php echo url('admin/Link/index'); ?>">
                                <i class="icon-double-angle-right"></i>
                                友链管理
                            </a>
                        </li>
                        <li>
                            <a href="<?php echo url('admin/Link/create'); ?>">
                                <i class="icon-double-angle-right"></i>
                                添加友情链接
                            </a>
                        </li>
                    </ul>
                </li>

                <!-- 广告 -->
                <li>
                    <a href="#" class="dropdown-toggle">
                        <i class="icon-glass"></i>
                        <span class="menu-text"> 广告管理 </span>
                        <b class="arrow icon-angle-down"></b>
                    </a>
                    <ul class="submenu">
                        <li>
                            <a href="<?php echo url('admin/Advertisement/index'); ?>">
                                <i class="icon-double-angle-right"></i>
                                广告列表
                            </a>
                        </li>
                        <li>
                            <a href="<?php echo url('admin/Advertisement/create'); ?>">
                                <i class="icon-double-angle-right"></i>
                                添加广告
                            </a>
                        </li>
                    </ul>
                </li>
            </ul><!-- /.nav-list -->
        <!--end控制台-->


            <div class="sidebar-collapse" id="sidebar-collapse">
                <i class="icon-double-angle-left" data-icon1="icon-double-angle-left"
                   data-icon2="icon-double-angle-right"></i>
            </div>

            <script type="text/javascript">
                try {
                    ace.settings.check('sidebar', 'collapsed')
                } catch (e) {
                }
            </script>
        </div>


                <div class="main-content">
                    <div class="breadcrumbs" id="breadcrumbs">
                        <script type="text/javascript">
                            try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
                        </script>

                        <ul class="breadcrumb">
                            <li>
                                <i class="icon-home home-icon"></i>
                                <a href="#">Home</a>
                            </li>

                            <li>
                                <a href="/category">分类管理</a>
                            </li>
                            <li class="active">添加一级分类</li>
                        </ul><!-- .breadcrumb -->

                    </div>

                    <div class="page-content">
                        <div class="page-header">
                        </div><!-- /.page-header -->











                        <div class="row">
                            <div class="col-xs-12">
                                <!-- PAGE CONTENT BEGINS -->

                                <form class="form-horizontal" role="form" action='/doaddcate/' method='post' >
                                    <div class="space-4"></div>

                                    <!-- name -->
                                    <div class="form-group">
                                        <label class="col-sm-3 control-label no-padding-right">CateName :</label>

                                        <div class="col-sm-9">
                                            <span class="input-icon" id='check'>
                                                <input type="text" id="ip"  name='name'  />
                                                <i class=" icon-book blue"></i>
                                                <span ><font color='#0f0' id='tip'></font></span>
                                            </span>
                                        </div>
                                    </div>


                                    <div class="space-4"></div>
                                    <!-- pid -->
                                    <div class="form-group">
                                        <label class="col-sm-3 control-label no-padding-right">Pid :</label>

                                        <div class="col-sm-9">
                                            <span class="input-icon" >
                                                <input type="text"  name='pid' value='0' readonly/>
                                                <i class=" icon-book blue"></i>
                                            </span>
                                        </div>
                                    </div>


                                    <div class="space-4"></div>
                                    <!-- path -->
                                    <div class="form-group">
                                        <label class="col-sm-3 control-label no-padding-right">Pid :</label>

                                        <div class="col-sm-9">
                                            <span class="input-icon" >
                                                <input type="text"  name='path'  value='0,' readonly/>
                                                <i class=" icon-book blue"></i>
                                            </span>
                                        </div>
                                    </div>

                                    <div class="space-4"></div>
                                    <!-- display -->
                                    <div class="form-group">
                                        <label class="col-sm-3 control-label no-padding-right">Display : </label>

                                                <label>
                                                    <input id="skip-validation" type="checkbox" class="ace ace-switch ace-switch-4"  name='display'/>
                                                    <span class="lbl"></span>
                                                </label>
                                    </div>
 

                                    <div class="clearfix form-actions">
                                        <div class="col-md-offset-3 col-md-9">
                                            <button class="btn btn-info" type="submit">
                                                <i class="icon-ok bigger-110"></i>
                                                提交
                                            </button>

                                            &nbsp; &nbsp; &nbsp;
                                            <button class="btn" type="reset">
                                                <i class="icon-refresh bigger-110"></i>
                                                重置
                                            </button>

                                            &nbsp; &nbsp; &nbsp;
                                            <a href='/category' class="btn btn-warning" type="reset">
                                                <i class="icon-undo bigger-110"></i>
                                                返回
                                            </a>
                                        </div>
                                    </div>
                                </form>

                                    <div class="hr hr-24"></div>

 
                            </div><!-- /.col -->
                        </div><!-- /.row -->
                    </div><!-- /.page-content -->
                </div><!-- /.main-content -->

<!-- basic scripts -->

<!--[if !IE]> -->

<script src="/static/admin/js/jquery-2.0.3.min.js"></script>

<script src="/static/admin/js/toastr.js"></script>

<!-- <![endif]-->

<!--[if IE]>
<script src="/static/admin/js/jquery-1.10.2/jquery.min.js"></script>
<![endif]-->

<!--[if !IE]> -->

<script type="text/javascript">
    window.jQuery || document.write("<script src='/static/admin/js/jquery-2.0.3.min.js'>" + "<" + "script>");
</script>

<!-- <![endif]-->

<!--[if IE]>
<script type="text/javascript">
    window.jQuery || document.write("<script src='/static/admin/js/jquery-1.10.2.min.js'>" + "<" + "script>");
</script>
<![endif]-->

<script type="text/javascript">
    if ("ontouchend" in document) document.write("<script src='/static/admin/js/jquery.mobile.custom.min.js'>" + "<" + "script>");
</script>
<!-- <script src="/static/admin/js/bootstrap.min.js"></script> -->
<script src="/static/admin/js/typeahead-bs2.min.js"></script>

<!-- page specific plugin scripts -->

<!--[if lte IE 8]>
<script src="/static/admin/js/excanvas.min.js"></script>
<![endif]-->


<!--[if IE]>
<script src="/static/admin/js/1.10.2/jquery.min.js"></script>
<![endif]-->

<!--[if !IE]> -->

<script type="text/javascript">
    window.jQuery || document.write("<script src='/static/admin/js/jquery-2.0.3.min.js'>" + "<" + "/script>");
</script>

<!-- <![endif]-->

<!--[if IE]>
<script type="text/javascript">
    window.jQuery || document.write("<script src='/static/admin/js/jquery-1.10.2.min.js'>" + "<" + "/script>");
</script>
<![endif]-->

<script type="text/javascript">
    if ("ontouchend" in document) document.write("<script src='/static/admin/js/jquery.mobile.custom.min.js'>" + "<" + "/script>");
</script>
<script src="/static/admin/js/bootstrap.min.js"></script>
<script src="/static/admin/js/typeahead-bs2.min.js"></script>

<!-- page specific plugin scripts -->

<script src="/static/admin/js/jquery.dataTables.min.js"></script>
<script src="/static/admin/js/jquery.dataTables.bootstrap.js"></script>

<!-- ace scripts -->

<script src="/static/admin/js/ace-elements.min.js"></script>
<script src="/static/admin/js/ace.min.js"></script>

<!-- inline scripts related to this page -->

<script type="text/javascript">
    ip.onfocus=function(){
        tip.innerHTML = '注意不要重名了哦~';
    }
    ip.onblur=function(){
        var name = ip.value;
        // console.log(name);
        check(name);
    }

    // 将非汉子和数字,字母,下划线替换成空
    ip.oninput=function(){
        ip.value = ip.value.replace(/[^\w\u4E00-\u9FA5]/g, '');
    }

    // if (document.all) {
    //     ip.onpropertychange = checkInput;
    // } else {
    //     ip.oninput = checkInput;
    // }

    // function checkInput() {
    //     ip.value = ip.value.replace(/\D/g, '');
    // }
    function check(name){
        $.ajax({
            type:'get',
            dataType:'json',
            data:{'name':name},
            url:'/checkcatename/',
            success:function(data){
                // console.log(data);
                if (data) {
                    tip.innerHTML = '<font color="red">'+'名字已存在,亲~换一个吧~~'+'</font>';
                }else{
                    // console.log(ip.value);
                    if (ip.value == '') {
                        tip.innerHTML = '<font color="red">'+'不能为空哦~'+'</font>';
                    }else{
                    tip.innerHTML = '<i class="icon-check">'+'</i>';
                    }
                }
                // console.log(data);
                // myModalLabel.innerHTML='编辑 '+ data['name'] +' 的分类';
            },
            error:function(){
                alert('ajax执行失败');
            },
        });
    }

    jQuery(function ($) {
        var oTable1 = $('#sample-table-2').dataTable({
            "aoColumns": [
                {"bSortable": false},
                null, null, null, null, null,
                {"bSortable": false}
            ]
        });


        $('table th input:checkbox').on('click', function () {
            var that = this;
            $(this).closest('table').find('tr > td:first-child input:checkbox')
                .each(function () {
                    this.checked = that.checked;
                    $(this).closest('tr').toggleClass('selected');
                });

        });


        $('[data-rel="tooltip"]').tooltip({placement: tooltip_placement});
        function tooltip_placement(context, source) {
            var $source = $(source);
            var $parent = $source.closest('table')
            var off1 = $parent.offset();
            var w1 = $parent.width();

            var off2 = $source.offset();
            var w2 = $source.width();

            if (parseInt(off2.left) < parseInt(off1.left) + parseInt(w1 / 2)) return 'right';
            return 'left';
        }
    })

</script>

</script>
<div style="display:none">
    <script src='http://v7.cnzz.com/stat.php?id=155540&web_id=155540' language='JavaScript' charset='gb2312'></script>
</div>
</body>
</html>

